package com.bbx.api.sdk.net.passeger.conn;

import java.io.InputStream;

import android.content.Context;

import com.bbx.api.sdk.model.passanger.Return.NearByDriver;
import com.bbx.api.sdk.net.base.BaseNetwork;
import com.bbx.api.sdk.net.base.GeneralParser;

/**
 * @Path com.bbx.api.sdk.net.passeger.conn.NearByDriverNet.java
 * @Author 严旭文
 * @Date 2016-6-8 下午1:53:49
 * @Company 蓝海（福建）信息技术有限公司
 * @Description 获取附近的可接单司机
 */
public class NearByDriverNet extends BaseNetwork {

	public NearByDriverNet(Context context, String datas, boolean is1or2) {
		super(context, false);
		setData(datas);
	}

	public NearByDriverNet(Context context,boolean is1or2) {
		super(context, false);
		url = is1or2 ? NEARBYDRIVER_Url : NEARBYDRIVER2_Url;
	}

	public void setData(String datas) {
		super.setData(datas);
		InputStream inputStream = getContentWithPOST((datas));
		if (inputStream != null) {
			parser = new GeneralParser(context, inputStream);
		}
	}

	@Override
	public Object getData() {
		// TODO Auto-generated method stub
		return parser.getData(NearByDriver.class);
	}

}
